{temp('admin/head')}
<link rel="stylesheet" href="{$adstyle}/js/datatables/dataTables.bootstrap.css">
	
</head>
<body class="page-body">
		
		{temp('admin/left')}
			
			{temp('admin/top')}
			
			<!-- Basic Setup -->
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">{$tit}</h3>
					<div class="panel-options">

						<a href="{$_url}/admin/?act=recruit&met=zjia_spgl{$gnpd}">
							<i class="fa-rotate-right"></i>
							刷新
						</a>
						
					</div>
				</div>
				<div class="panel-body">
					
					<script type="text/javascript">
					jQuery(document).ready(function($)
					{
						$("#example").dataTable({
							"oLanguage": {
								"sUrl":"{$adstyle}/js/datatables/js/zn.txt"
							},
							aLengthMenu: [
								[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]
							]
						});
					});
					</script>
					
					<div data-pattern="priority-columns" data-add-display-all-btn="false" data-add-focus-btn="false">
					
					<table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">
						<thead>
							<tr>
								<th>ID号</th>
								<th>专家ID</th>
								<th>课程名称</th>
								<th>扣除积分</th>
								<th>浏览量</th>
								<th>审核状态</th>
								<th>上传时间</th>
								<th>审核时间</th>
								<th>操作</th>
							</tr>
						</thead>
					
						<tbody class="middle-align">
							{if(@$rs)}
							{foreach($rs as $k=>$v)}
							<tr>
								<td>{$v['id']}</td>
								<td>{$v['zjid']}</td>
								<td style="width:20%">{$v['name']}</td>
								<td>{$v['jifen']}</td>
								<td>{$v['ckcs']}</td>
								<td>
									{if(@$v['zt'] == 0)}
									<div class="btn-group">
										<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown">
											审核 <span class="caret"></span>
										</button>
										<ul class="dropdown-menu dropdown-white" role="menu">
											<li>
												<a href="#" onClick="shenhe({$v['id']},{$v['zjid']},1)">同意</a>
											</li>
											<li>
												<a href="#" onClick="shenhe({$v['id']},{$v['zjid']},2)">拒绝</a>
											</li>
										</ul>
									</div>
									{else}
									审核<span style="color:red;">{if($v['zt'] == 1)}通过{else}被拒绝{/if}</span>
									{/if}
								</td>
								<td>{code(echo date('Y-m-d H:i',$v['time']))}</td>
								<td>{if(@$v['stime'])}{code(echo date('Y-m-d H:i',$v['stime']))}{else}未审核{/if}</td>
								<td>
									<a href="{$_url}/admin/?act=recruit&met=zjia_spxx&spid={$v['id']}&zjid={$v['zjid']}{$gnpd}" class="btn btn-secondary btn-sm btn-icon icon-left">
										查看详情
									</a>	
									<a href="{$_url}/admin/?act=recruit&met=zjia_spxx&spid={$v['id']}&zjid={$v['zjid']}&bj=1{$gnpd}" class="btn btn-info btn-sm btn-icon icon-left">
										编辑
									</a>	
									<span  class="btn btn-pink btn-sm btn-icon icon-left" onclick="tuijian({$v['id']},{$v['zjid']})">
										{if($v['tuijian'])}取消推荐{else}推荐{/if}
									</span>							
								</td>
							</tr>
							{/foreach}
							{/if}
						</tbody>
					</table>
					</div>
				</div>
			</div>
			
		{temp('admin/foot')}
	<script type="text/javascript">
		function shenhe(spid,zjid,t){//审核
			$.post('{$_url}/admin/?act=recruit&met=spshenghe{$gnpd}',{spid:spid,zjid:zjid,zt:t},function(data){
				if(data == 'cg'){
					location.href='{$_url}/admin/?act=recruit&met=zjia_spgl{$gnpd}';
				}else{
					alert(data);
				}
			});
		}
		
		function tuijian(id,zjid){
			$.post('{$_url}/admin/?act=recruit&met=spshenghe{$gnpd}',{spid:id,zjid:zjid,type:1},function(data){
				if(data == 'cg'){
					location.href='{$_url}/admin/?act=recruit&met=zjia_spgl{$gnpd}';
				}else{
					alert(data);
				}
			});
		}
	</script>
	<!-- Bottom Scripts -->
	<script src="{$adstyle}/js/bootstrap.min.js"></script>
	<script src="{$adstyle}/js/TweenMax.min.js"></script>
	<script src="{$adstyle}/js/resizeable.js"></script>
	<script src="{$adstyle}/js/joinable.js"></script>
	<script src="{$adstyle}/js/xenon-api.js"></script>
	<script src="{$adstyle}/js/xenon-toggles.js"></script>
	<script src="{$adstyle}/js/datatables/js/jquery.dataTables.min.js"></script>

	<!-- Imported scripts on this page -->
	<script src="{$adstyle}/js/datatables/dataTables.bootstrap.js"></script>
	<script src="{$adstyle}/js/rwd-table/js/rwd-table.min.js"></script>

	<!-- JavaScripts initializations and stuff -->
	<script src="{$adstyle}/js/xenon-custom.js"></script>

</body>
</html>